package 力扣._100088_有序三元组中的最大值1;

public class Solution {
    public long maximumTripletValue(int[] nums) {
        long max = -1;
        for (int i = 0; i < nums.length; i++) {
            for (int j = i + 1; j < nums.length; j++) {
                for (int k = j + 1; k < nums.length; k++) {
                    long t = (long) (nums[i] - nums[j]) * nums[k];
                    max = Math.max(t, max);
                }
            }
        }
        return Math.max(max, 0);
    }

    public static void main(String[] args) {
        int[] t =new int[]{1000000,1,1000000};
    }
}
